﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common;
using Operators;

namespace Satates
{
    public class State
    {
        Template currentState;
        iOperator currentOperator;
        iOperator redoOperator;

        public State(State v)
        {
            currentState = v.currentState;
            currentOperator = v.currentOperator;
            redoOperator = v.redoOperator;
        }
        
        public Template CurrentState
        {
            get { return currentState; }
            set { this.currentState = value; }
        }
        public iOperator CurrentOperator
        {
            get { return currentOperator; }
            set { this.currentOperator = value; }
        }
        public iOperator RedoOperator
        {
            get { return redoOperator; }
            set { this.redoOperator = value; }
        }
        public State(Template State, iOperator Operator)
        {
            currentState = State;
            currentOperator = Operator;
        }
        public override string ToString()
        {
            return currentState.ToString();
        }
        public bool equals(State t)
        {
            if (this.currentState.ToString().Equals(t.currentState.ToString())) return true; else return false;
        }
    }
}
